<script setup lang="ts">
var emit = defineEmits(["myEvent"]);
function sendEvent() {
  //向父组件传递事件
  emit("myEvent");
}
</script>
<template>
  <input type="button" value="子组件按钮" @click="sendEvent()" />
</template>
